-- file zs4/libBits.hs
import Data.Bits

isEven x = (x .&. 1) == 0

is2Exp x = (x .&. (x - 1)) == 0